package com.bdsoft.actions.noticeManage.DTO;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.Date;

@Data
public class NoticeDTO {
    // 强制要求客户端必须提供ID
    @NotBlank(message = "ID不能为空")
    @Size(min = 1, max = 32, message = "ID长度必须在1-32个字符之间")
    private String id;

    @NotBlank(message = "标题不能为空")
    @Size(max = 100, message = "标题最长100个字符")
    private String title;

    @NotBlank(message = "内容不能为空")
    private String content;

    @NotBlank(message = "创建人不能为空")
    private String creatorId;


    // 响应字段
    private Integer status; // 0-草稿 1-已发布 2-已撤回
    private Date createTime;
    private Date updateTime;
    private Date publishTime;

    // 查询字段
    private Integer pageNum = 1;
    private Integer pageSize = 10;
    private String searchTitle;
    private Integer searchStatus;
}